<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>视频播放</title>
    <link rel="stylesheet" href="/static/layui/css/layui.css" media="all">
    <script src="https://cdnjs.cloudflare.com/ajax/libs/chimee/0.11.0/index.browser.js"></script>
    <script src="/static/layui/layui.js"></script>
    <script src="/static/js/jquery.min.js"></script>
</head>
<body style="height: 100%">

<div id="wrapper" style="width: 100vw;height:100vh"></div>

<script>
    window.onload= function(){
        var chimee = new Chimee({
            wrapper: '#wrapper',
            src: '${url}${videoUrl}',
            controls: true,
            autoplay: true,
        });
    }
    layui.use(['upload','jquery','form','util'], function(){
        var $ = layui.jquery
            ,upload = layui.upload
            ,form = layui.form;
        //监听提交
        form.on('submit(commit)', function(data){
            $.ajax({
                url : '/manage/videosItem/notPass',
                type : 'post',
                dataType : 'json',
                data : data.field,
                success : function (data) {
                    if (data.code==200){
                        layer.msg(data.msg,{icon: 1, time: 500},function () {
                            layer.close();
                            window.parent.location.reload();
                        });
                    }else{
                        layer.msg(data.msg,{icon: 2, time: 1000});
                    }
                }
            })
            return false;
        });
    });
</script>

</body>
</html>
